package com.mpp.admin.util;

import com.mpp.admin.entity.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

import javax.servlet.ServletContext;

/**
 * @author mapp
 * @des shiro 工具类
 * @date 2019/2/15
 */
public class ShiroUtil {

    public static User getUser() {
        Subject subject = SecurityUtils.getSubject();
        return (User) subject.getPrincipal();
    }
}
